package com.block.product.service.union;

import com.block.product.model.dto.UniLoginDTO;
import com.block.product.model.param.ProdApiInfoParam;
import com.block.product.model.result.UnionLoginResult;
import com.block.product.service.IUnionLoginService;
import org.springframework.stereotype.Service;

@Service
public class DefaultUnionLoginService implements IUnionLoginService {


    @Override
    public UnionLoginResult checkUser(UniLoginDTO uniLoginDTO, ProdApiInfoParam apiInfoParam) {
        UnionLoginResult loginResult = new UnionLoginResult();
        loginResult.setSuccess(true);
        loginResult.setCode("200");
        loginResult.setMessage("成功");
        loginResult.setResultInfo("200|成功");
        loginResult.setParamInfo(uniLoginDTO.getMobile());

        return loginResult;
    }

    @Override
    public UnionLoginResult loginUser(UniLoginDTO uniLoginDTO, ProdApiInfoParam apiInfoParam) {

        UnionLoginResult loginResult = new UnionLoginResult();
        loginResult.setSuccess(true);
        loginResult.setCode("200");
        loginResult.setMessage("成功");
        loginResult.setResultInfo("200|成功");
        loginResult.setParamInfo(uniLoginDTO.getMobile());

        loginResult.setLoginUrl("https://h5.longzankeji.cn/");

        return loginResult;
    }
}
